setwd("")

install.packages("readstata13")
library(readstata13)

stata2.dat <- read.dta13("congruence2.dta")

corr_data      <- data.frame(congruence2$lroverall, congruence2$lrgen, congruence2$log_rile, congruence2$ratio_rile)
  
corresults<-cor(corr_data, use = "complete")
head(round(corresults,2))

rownames(corresults) <- c("Overall Left-Right", "CHES Left-Right General", "CMP Log RILE", "CMP Ratio RILE")
colnames(corresults) <- c("Overall Left-Right", "CHES Left-Right General", "CMP Log RILE", "CMP Ratio RILE")

par(mfrow=c(1, 1))
library(corrplot)
  corrplot(corresults, method="pie", tl.col = "black", tl.srt = 50, tl.cex=0.75)